let baseUrl = 'http://www.itcbc.com:8080'
$.ajaxPrefilter(function (option) {
    option.url = baseUrl + option.url
    // 设置token值
    option.headers = {
        Authorization: localStorage.getItem('token')
    }
    // 请求失败返回 complete 函数
    option.complete = function (xhr) {
        let res = xhr.responseJSON
        if (res.status == 1 && res && res.message == '身份认证失败') {
            localStorage.removeItem('token')
            location.href = './login.html'
        }
        // alert(xhr.responseJSON.message)
    }
})